<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../libs/vue.js"></script>
    <link rel="stylesheet" href="../libs/animate.css@4.1.1.css">
    <style>
        .box {
            width: 200px;
            height: 200px;
            background-color: gold;
        }
    </style>
</head>
<body>
    <div id="app">
        <button @click="toggle">点击切换</button>
        <hr>
        <transition enter-active-class="animate__animated animate__bounceInUp" leave-active-class="animate__animated animate__backOutDown">
            <h3 class="box" v-show="flag">hello vue</h3>
        </transition>
    </div>
    <script>
        let vm = new Vue({
            el:'#app',
            data:{
                msg:'hello vue',
                flag:true
            },
            methods: {
                toggle(){
                    this.flag = !this.flag
                }
            },
        })
    </script>
</body>
</html>